//package com.zerone.pay.trade.web.controller.weixin;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import org.sword.wechat4j.request.WechatRequest;
//
//
///**
// * Created by tyongfu@yiji.com on 2015/12/21.
// */
//@Component("subcribeProcessor")
//@Wechater(key = "subcritbe_processor", desc = "订阅处理器")
//public class SubcribeProcessor extends WechatProcessor {
//
//	private static final Logger logger = LoggerFactory.getLogger(SubcribeProcessor.class);
//
//	@Autowired
//	private UserRepository userRepository;
//
//	private String password = "mumwith";
//
//	@Autowired
//	private VersonMapService versonMapService;
//
//	@Override
//	public String process(WechatRequest request) {
//		/*User user = userRepository.findOne(request.getFromUserName());
//		if (user == null) {
//			user = new User();
//			UserManager userManager = new UserManager();
//			org.sword.wechat4j.user.User wechatUser = userManager.getUserInfo(request.getFromUserName());
//			BeanUtils.copyProperties(wechatUser, user, "language", "nickName", "city", "country", "province", "remark");
//			user.setNickName(WeixinEncodeUtil.encodeFromWechat(wechatUser.getNickName()));
//			user.setCity(WeixinEncodeUtil.encodeFromWechat(wechatUser.getCity()));
//			user.setCountry(WeixinEncodeUtil.encodeFromWechat(wechatUser.getCountry()));
//			user.setProvince(WeixinEncodeUtil.encodeFromWechat(wechatUser.getProvince()));
//			user.setRemark(WeixinEncodeUtil.encodeFromWechat(wechatUser.getRemark()));
//			user.setUserName(wechatUser.getUnionId());
//			user.setPassword(MD5Util.md(password));
//			versonMapService.initVersonMap(wechatUser.getUnionId());
//		} else {
//			user.setSubscribe(1);
//		}
//
//		logger.info("======================user subcribing======================,{}", user);
//
//		userRepository.save(user);*/
//		return "哇，你已经关注了妈妈伴了也，真是一个明智的选择呢。在这里你不仅可以看到妈妈伴APP记录下来的体温数据，还能学到一些健康喂养宝宝的小知识，同时还可以同与你一样聪明的妈妈们分享各自宝宝的快乐时光呢。现在就让咱们开始吧。";
//	}
//
//
//}
